function biz1(){
  return 1;
}

function biz2(){
  return 2;
}

function biz3(){
  return 3;
}

function biz4(){
  return 4;
}

function biz5(){

  // print(RequestUtil.get("http://www.baidu.com"))
}

function biz6(){
    context.put("a", 1)
}

function biz7(){

  _import("java.sql.Connection")
  _import("java.sql.DriverManager")
  _import("java.sql.ResultSet")
  _import("java.sql.SQLException")
  _import("java.sql.Statement")
  _import("java.lang.Class")
  // 数据库驱动类名的字符串
  var driver = "com.mysql.cj.jdbc.Driver";
  // 数据库连接串
  var url = "jdbc:mysql://127.0.0.1:3307/scheduler?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true";
  // 用户名
  var username = "root";
  // 密码
  var password = "root";
  var conn = null;
  var stmt = null;
  var rs = null;
  try {
    // 1、加载数据库驱动（ 成功加载后，会将Driver类的实例注册到DriverManager类中）
    Class.forName(driver);
    // 2、获取数据库连接
    conn = DriverManager.getConnection(url, username, password);
    // 3、获取数据库操作对象
    stmt = conn.createStatement();
    // 4、定义操作的SQL语句
    var sql = "select * from projects where id = 392";
    // 5、执行数据库操作
    rs = stmt.executeQuery(sql);
    // 6、获取并操作结果集
    while (rs.next()) {
      print(rs.getInt("id"));
      print(rs.getString("name"));
    }
  } catch (e) {
    e.printStackTrace();
  } finally {
    // 7、关闭对象，回收数据库资源
    if (rs != null) { //关闭结果集对象
      try {
        rs.close();
      } catch (e) {
        e.printStackTrace();
      }
    }
    if (stmt != null) { // 关闭数据库操作对象
      try {
        stmt.close();
      } catch (e) {
        e.printStackTrace();
      }
    }
    if (conn != null) { // 关闭数据库连接对象
      try {
        if (!conn.isClosed()) {
          conn.close();
        }
      } catch (e) {
        e.printStackTrace();
      }
    }
  }
}

function biz8() {
  var HashMap = Java.type("java.util.HashMap")

  var map = new HashMap()

  map.put("a", 1)
  print(map.a)
  return map.get("a")
}

function biz9() {
  load('js/console.js')
  console.log('woshihoujinxin')
}

function biz10(){

  var arr = [ "hello", "world" ];
  for each (a in arr) {
    console.log(a)
  }
}

function biz11(){
  var list = new ArrayList()
  list.add("hello")
  list.add("world")
  for each (a in list) {
    console.log(a)
  }
}

function biz12(){

  logger.info("xxxxxxxxxxx")
  print(1)
}

function biz13(){
  var thread = new Thread(function() {
      print(Thread.currentThread().getName())
  });
  thread.start();
  thread.join()
}